import Mustache from "./mustache.js";

var view = {
  title: "Joe",
  calc: function () {
    return 2 + 4;
  },
  bol: true,
  arr: [{ has: false }, { has: true }]
};

var output = Mustache.render(`{{#bol}} {{#arr}} {{#has}} 有没有 {{/has}} {{/arr}}  
     spends {{/bol}}
 `, view);

document.body.innerHTML = output;

console.log(output);